#ifndef PROJECTTASKGANTT_H
#define PROJECTTASKGANTT_H
#include <QWidget>
#include <QDate>
#include <QAbstractTableModel>
#include <KDGanttView>
#include <KDGanttConstraintModel>
#include <KDGanttDateTimeGrid>
#include <KDGanttGlobal>
#include <KDGanttGraphicsView>
#include <KDGanttItemDelegate>
#include <KDGanttStyleOptionGanttItem>

#include <QSplitter>
#include <QTreeView>
#include <QHeaderView>
#include <QVBoxLayout>
#include "qpagebar.h"

namespace KDGantt {
class View;
}

struct PersonTask
{
    QString projectName;
    QString stroyName;
    QString taskId;
    QString taskName;
    QString taskStatus;
    QString developName;
    QString developRole;
    QString consumed;
    QString title;
    QDate start;
    QDate end;
};


class PersonTaskModel;
class PersonTaskGantt : public QWidget
{
    Q_OBJECT
public:
    explicit PersonTaskGantt(QWidget *parent = nullptr);

public:

    KDGantt::View *m_view;
    KDGantt::DateTimeGrid *m_dataGrid;
    PersonTaskModel *m_model;
    QPageBar *m_pageBar;
    QVBoxLayout *m_layoutGantt;

    void SetGanttModel();
    void SetModelFlag(int modelflag);
    void BindModelData(const QList<PersonTask> &modeldata);
    void SetStartEndData(QDate &startdate, QDate &enddate);
signals:

};

#endif // PROJECTTASKGANTT_H
